﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DTO;
using DAO;

namespace BUS
{
    public class BUS_DoanhNghiep
    {
        DAO_DoanhNghiep dao_DN = new DAO_DoanhNghiep();
        public string GetDiaChi(int MaDN)
        {
            return dao_DN.GetDiaChi(MaDN);
        }
        public List<DTO_DoanhNghiep> LayDSDN()
        {
            return dao_DN.LayDSDN();
        }
        public int LayMaDN(int matk)
        {
            List<DTO_DoanhNghiep> doanhNghiep = dao_DN.LayThongTinDoanhNghiep(matk);
            int maDN = doanhNghiep[0].MaDN;
            return maDN;
        }
        public List<DTO_DoanhNghiep> LayDN(int matk)
        {
            return dao_DN.LayThongTinDoanhNghiep(matk);
        }

        public List<DTO_ChiTietDoanhNghiep> LayChiTietDN(int matk)
        {
            return dao_DN.LayThongTinChiTietDoanhNghiep(matk);
        }
        public void Update(DTO_DoanhNghiep dn)
        {
            dao_DN.Update(dn);
        }

        public bool KTDoanhNghiep(string tenDoanhNghiep)
        {
            return dao_DN.KTDoanhNghiep(tenDoanhNghiep);
        }
        public void ThemDoanhNghiep(string dnTaikhoan, string chucvu, string name, string website,
                                    string diachi, string loaihinh, string noimuonquangcao, string contactinfo,
                                    string tinhtrang)
        {
            dao_DN.ThemDoanhNghiep(dnTaikhoan, chucvu, name, website, diachi, loaihinh, noimuonquangcao, contactinfo, tinhtrang);
        }
    }
}
